package com.yuanqiworld.vw.domain;

import org.springframework.roo.addon.javabean.RooJavaBean;

import javax.persistence.Embeddable;
import java.text.MessageFormat;

// 仅仅用于存放到数据库.运算用Java3D的类Vector3d.
@RooJavaBean
@Embeddable
public class Vector3 {
    private static final MessageFormat messageFormat = new MessageFormat("{0,number,#.######},{1,number,#.######},{2,number,#.######}");
    private double x;
    private double y;
    private double z;

    @Override
    public String toString() {
        return messageFormat.format(new Object[]{x, y, z});
    }
}
